/**
 * scope.userInfo                ->    用户信息
 * scope.userLocation            ->    地理位置
 * scope.userLocationBackground  ->    后台定位
 * scope.address                 ->    通信地址
 * scope.record                  ->    录音功能
 * scope.writePhotosAlbum        ->    保存到相册
 * scope.camera                  ->    摄像头
 * scope.invoice
 * scope.invoiceTitle
 * scope.werun
 */

const authorize = (scope) => {
  return new Promise((resolve, reject) => {
    uni.authorize({
      scope: scope,
      success: (res) => {
        resolve(res);
      },
      fail: (err) => {
        reject(err);
      }
    })
  })
}

export default authorize
